﻿/***************************************************************************/
/// <summary>
/// 
///  <title>SLIC</title>
///  <description>DefaultController for Home page and Index</description>
///  <copyRight>Copyright (c) 2010</copyRight>
///  <company>IronOne Technologies (Pvt)Ltd</company>
///  <createdOn>2011-08-01</createdOn>
///  <author></author>
///  <modification>
///     <modifiedBy></modifiedBy>
///      <modifiedDate></modifiedDate>
///     <description></description>
///  </modification>
///
/// </summary>
/// 
/***************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

#region SLICReferences
using SLIC.Models.Enums;
#endregion SLICReferences

#region ThirdPartyReferences
using log4net;
using System.Collections.Specialized;
#endregion ThirdPartyReferences

namespace SLIC.Controllers
{    
    public class DefaultController : BaseController
    {
        protected static readonly ILog log = LogManager.GetLogger("root");
        //
        // GET: /Default1/

        /// <summary>Direct to Home page </summary>
        /// <param name="fmt">Format of the Request</param>
        ///<returns>
        ///Direct to home page
        ///</returns>      
        /// <remarks></remarks> 
        public ActionResult Index(string fmt)
        {
            log4net.Config.XmlConfigurator.Configure();
            log.Info(LogPoint.Entry.ToString() + "," + this.ControllerContext.Controller.ToString() + ",Default Index," + User.Identity.Name);

            // Create a string to contain the parameters'
            // information.
            //string paramInfo = "";

            // Obtain a reference to the Request.Params
            // collection.
            /*
            NameValueCollection pColl = Request.Params;

            // Iterate through the collection and add
            // each key to the string variable.
            for (int i = 0; i <= pColl.Count - 1; i++)
            {
              
              //  paramInfo += "Key: " + pColl.GetKey(i) + "<br />";
                log.Info("Key: " + pColl.GetKey(i));
                // Create a string array that contains
                // the values associated with each key.
                string[] pValues = pColl.GetValues(i);

                // Iterate through the array and add
                // each value to the string variable.
                string paramInfo = "";
                for (int j = 0; j <= pValues.Length - 1; j++)
                {
                    paramInfo += "Value:" + pValues[j] ;
                    log.Info("Value:" + pValues[j]);
                }
              
            }*/
            return GetFormatView("Home/Home.aspx");            
        }
       
    }
}
